package entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
@Entity
@Table(name="RemitoExterno")
public class RemitoExternoEntity extends DocumentoEntity implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -2087750216373796457L;
	int numero;
	@OneToOne(cascade=CascadeType.ALL)
	@JoinColumn
	private ClienteEntity cliente;
	@OneToMany(cascade=CascadeType.ALL)
	@JoinColumn(name="IdRemito")
	private List<OrdenPedidoEntity> ordenes=new ArrayList<OrdenPedidoEntity>();
	
	public int getNumero() {
		return numero;
	}
	public void setNumero(int numero) {
		this.numero = numero;
	}
	
	public RemitoExternoEntity(int numero, ClienteEntity cliente,
			List<OrdenPedidoEntity> ordenes) {
		super();
		this.numero = numero;
		this.cliente = cliente;
		this.ordenes = ordenes;
	}
	public RemitoExternoEntity(){
		
	}
	public List<OrdenPedidoEntity> getOrdenes() {
		return ordenes;
	}
	public void setOrdenes(List<OrdenPedidoEntity> ordenes) {
		this.ordenes = ordenes;
	}
	public ClienteEntity getCliente() {
		return cliente;
	}
	public void setCliente(ClienteEntity cliente) {
		this.cliente = cliente;
	}
	

}
